
$.ajax({
    url,
    type: "POST",
    dataType: "json",
    data: {
        id: "1"
    }
}).then(function (data) {
    console.log(data);
})


window.$ = {
    ajax(options) {
        return fetch(options, url, {
            method: options.type || "GET",
            body: JSON.stringify(options.data || {})
        }).then(response => {
            console.log(response)
        })

    }
}